package mylab.utils.common;

import java.lang.management.ManagementFactory;


public class SystemUtil extends cn.hutool.system.SystemUtil {

    public static int getPID() {
        // get name representing the running Java virtual machine.
        String name = ManagementFactory.getRuntimeMXBean().getName();
        System.out.println(name);
        // get pid
        String pid = name.split("@")[0];
        return Integer.parseInt(pid);
    }
}
